package com.party.core.model.crowdfund;

import com.party.core.model.BaseModel;
import com.party.core.model.counterfoil.Counterfoil;

import java.util.Date;
import java.util.List;

/**
 * 众筹事件
 * Created by wei.li
 *
 * @date 2017/4/25 0025
 * @time 16:15
 */
public class CrowdfundEvent extends BaseModel {
    private static final long serialVersionUID = 4778148333184476369L;

    //事件名称
    private String name;

    private String pic;            // 封面图
    private Date startTime;        // 开始时间
    private Date endTime;        // 结束时间
    private Integer limitNum;        // 人数上限
    private Float price;            // 价格
    private Integer crowdfundHintSwitch; //众筹提醒开关
    private Integer templateStyle; //是否隐藏数据
    private String cityId;        // 城市ID
    private String area;        // 区,字符串，由后台录入
    private String place;        // 活动场所
    private String lng;            // 经度
    private String lat;            // 纬度
    private String crowdDeclaration; // 众筹宣言
    private String supportDeclaration; // 支持宣言
    private String representDeclaration; // 宣言

    private Integer switchSupportRange; // 选择支持金额范围 1：默认金额 2：固定金额 3：自定义金额
    private String supportRange; // 支持金额范围
    private Integer rangeStart;
    private Integer rangeEnd;

    private String realname; // 发布者昵称
    private String logo; // 发布者Logo
    private Integer crowdfundNum; // 众筹项目数

    private Integer progress; // 是否进行中 1：是 2：否

    private Integer isHome;//是否显示主页

    private Integer checkStatus;//主题审核状态 0:待审核 1:审核通过 2:审核未通过（已拒绝）
    private String checkRemark;//审核备注，用于在拒绝主题时备注拒绝原因
    private Integer eventType;//活动类型  0为普通活动  1为高端活动
    private Double serviceCharge;//审核通过时可选择设置对应主题的服务费

    private Integer strategyState;//众筹攻略:0显示，1不显示

    private Integer personalRanking;//个人排行榜，0:显示全部人数,1:自定义显示人数,2:不显示
    private Integer peopleNum;//个人排行榜自定义人数
    private List<Counterfoil> counterfoils;//多票据
    //是否播放音乐
    private Integer isPlayMusic ;
    //音频id
    private String audioId;

    private Integer isMultiple; // 是否为多场 0：单场 1：多场
    //众筹海报url
    private String networkImagePath;
    //是否自定义海报（0：默认/1：自定义）
    private Integer isCustomPoster;
    private Integer isProblem;//常见问题。0:不显示，1:显示

    public List<Counterfoil> getCounterfoils() {
        return counterfoils;
    }

    public void setCounterfoils(List<Counterfoil> counterfoils) {
        this.counterfoils = counterfoils;
    }

    public Integer getIsProblem() {
        return isProblem;
    }

    public void setIsProblem(Integer isProblem) {
        this.isProblem = isProblem;
    }

    public Integer getStrategyState() {
        return strategyState;
    }

    public void setStrategyState(Integer strategyState) {
        this.strategyState = strategyState;
    }

    public Integer getPeopleNum() {
        return peopleNum;
    }

    public void setPeopleNum(Integer peopleNum) {
        this.peopleNum = peopleNum;
    }

    public Integer getPersonalRanking() {
        return personalRanking;
    }

    public void setPersonalRanking(Integer personalRanking) {
        this.personalRanking = personalRanking;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getLimitNum() {
        return limitNum;
    }

    public void setLimitNum(Integer limitNum) {
        this.limitNum = limitNum;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Integer getCrowdfundHintSwitch() {
        return crowdfundHintSwitch;
    }

    public void setCrowdfundHintSwitch(Integer crowdfundHintSwitch) {
        this.crowdfundHintSwitch = crowdfundHintSwitch;
    }

    public Integer getTemplateStyle() {
        return templateStyle;
    }

    public void setTemplateStyle(Integer templateStyle) {
        this.templateStyle = templateStyle;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getCrowdDeclaration() {
        return crowdDeclaration;
    }

    public void setCrowdDeclaration(String crowdDeclaration) {
        this.crowdDeclaration = crowdDeclaration;
    }

    public String getSupportDeclaration() {
        return supportDeclaration;
    }

    public void setSupportDeclaration(String supportDeclaration) {
        this.supportDeclaration = supportDeclaration;
    }

    public String getRepresentDeclaration() {
        return representDeclaration;
    }

    public void setRepresentDeclaration(String representDeclaration) {
        this.representDeclaration = representDeclaration;
    }

    public Integer getCrowdfundNum() {
        return crowdfundNum;
    }

    public void setCrowdfundNum(Integer crowdfundNum) {
        this.crowdfundNum = crowdfundNum;
    }

    public Integer getProgress() {
        return progress;
    }

    public void setProgress(Integer progress) {
        this.progress = progress;
    }

    public Integer getSwitchSupportRange() {
        return switchSupportRange;
    }

    public void setSwitchSupportRange(Integer switchSupportRange) {
        this.switchSupportRange = switchSupportRange;
    }

    public String getSupportRange() {
        return supportRange;
    }

    public void setSupportRange(String supportRange) {
        this.supportRange = supportRange;
    }

    public Integer getRangeStart() {
        return rangeStart;
    }

    public void setRangeStart(Integer rangeStart) {
        this.rangeStart = rangeStart;
    }

    public Integer getRangeEnd() {
        return rangeEnd;
    }

    public void setRangeEnd(Integer rangeEnd) {
        this.rangeEnd = rangeEnd;
    }

    public Integer getIsHome() {
        return isHome;
    }

    public void setIsHome(Integer isHome) {
        this.isHome = isHome;
    }

    public Integer getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }

    public String getCheckRemark() {
        return checkRemark;
    }

    public void setCheckRemark(String checkRemark) {
        this.checkRemark = checkRemark;
    }

    public Integer getEventType() {
        return eventType;
    }

    public void setEventType(Integer eventType) {
        this.eventType = eventType;
    }

    public Double getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(Double serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public Integer getIsPlayMusic() {
        return isPlayMusic;
    }

    public void setIsPlayMusic(Integer isPlayMusic) {
        this.isPlayMusic = isPlayMusic;
    }

    public String getAudioId() {
        return audioId;
    }

    public void setAudioId(String audioId) {
        this.audioId = audioId;
    }

    public Integer getIsCustomPoster() {
        return isCustomPoster;
    }

    public void setIsCustomPoster(Integer isCustomPoster) {
        this.isCustomPoster = isCustomPoster;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        CrowdfundEvent that = (CrowdfundEvent) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (pic != null ? !pic.equals(that.pic) : that.pic != null) return false;
        if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) return false;
        if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false;
        if (limitNum != null ? !limitNum.equals(that.limitNum) : that.limitNum != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (crowdfundHintSwitch != null ? !crowdfundHintSwitch.equals(that.crowdfundHintSwitch) : that.crowdfundHintSwitch != null)
            return false;
        if (templateStyle != null ? !templateStyle.equals(that.templateStyle) : that.templateStyle != null)
            return false;
        if (cityId != null ? !cityId.equals(that.cityId) : that.cityId != null) return false;
        if (area != null ? !area.equals(that.area) : that.area != null) return false;
        if (place != null ? !place.equals(that.place) : that.place != null) return false;
        if (lng != null ? !lng.equals(that.lng) : that.lng != null) return false;
        if (lat != null ? !lat.equals(that.lat) : that.lat != null) return false;
        if (crowdDeclaration != null ? !crowdDeclaration.equals(that.crowdDeclaration) : that.crowdDeclaration != null)
            return false;
        if (supportDeclaration != null ? !supportDeclaration.equals(that.supportDeclaration) : that.supportDeclaration != null)
            return false;
        if (representDeclaration != null ? !representDeclaration.equals(that.representDeclaration) : that.representDeclaration != null)
            return false;
        if (switchSupportRange != null ? !switchSupportRange.equals(that.switchSupportRange) : that.switchSupportRange != null)
            return false;
        if (supportRange != null ? !supportRange.equals(that.supportRange) : that.supportRange != null) return false;
        if (rangeStart != null ? !rangeStart.equals(that.rangeStart) : that.rangeStart != null) return false;
        if (rangeEnd != null ? !rangeEnd.equals(that.rangeEnd) : that.rangeEnd != null) return false;
        if (realname != null ? !realname.equals(that.realname) : that.realname != null) return false;
        if (logo != null ? !logo.equals(that.logo) : that.logo != null) return false;
        if (crowdfundNum != null ? !crowdfundNum.equals(that.crowdfundNum) : that.crowdfundNum != null) return false;
        if (progress != null ? !progress.equals(that.progress) : that.progress != null) return false;
        return isHome != null ? isHome.equals(that.isHome) : that.isHome == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (pic != null ? pic.hashCode() : 0);
        result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (limitNum != null ? limitNum.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (crowdfundHintSwitch != null ? crowdfundHintSwitch.hashCode() : 0);
        result = 31 * result + (templateStyle != null ? templateStyle.hashCode() : 0);
        result = 31 * result + (cityId != null ? cityId.hashCode() : 0);
        result = 31 * result + (area != null ? area.hashCode() : 0);
        result = 31 * result + (place != null ? place.hashCode() : 0);
        result = 31 * result + (lng != null ? lng.hashCode() : 0);
        result = 31 * result + (lat != null ? lat.hashCode() : 0);
        result = 31 * result + (crowdDeclaration != null ? crowdDeclaration.hashCode() : 0);
        result = 31 * result + (supportDeclaration != null ? supportDeclaration.hashCode() : 0);
        result = 31 * result + (representDeclaration != null ? representDeclaration.hashCode() : 0);
        result = 31 * result + (switchSupportRange != null ? switchSupportRange.hashCode() : 0);
        result = 31 * result + (supportRange != null ? supportRange.hashCode() : 0);
        result = 31 * result + (rangeStart != null ? rangeStart.hashCode() : 0);
        result = 31 * result + (rangeEnd != null ? rangeEnd.hashCode() : 0);
        result = 31 * result + (realname != null ? realname.hashCode() : 0);
        result = 31 * result + (logo != null ? logo.hashCode() : 0);
        result = 31 * result + (crowdfundNum != null ? crowdfundNum.hashCode() : 0);
        result = 31 * result + (progress != null ? progress.hashCode() : 0);
        result = 31 * result + (isHome != null ? isHome.hashCode() : 0);
        return result;
    }

    public Integer getIsMultiple() {
        return isMultiple;
    }

    public void setIsMultiple(Integer isMultiple) {
        this.isMultiple = isMultiple;
    }

    public String getNetworkImagePath() {
        return networkImagePath;
    }

    public void setNetworkImagePath(String networkImagePath) {
        this.networkImagePath = networkImagePath;
    }
}
